package com.qst.system.controller;

import com.qst.common.core.controller.BaseController;
import com.qst.common.core.domain.AjaxResult;
import com.qst.common.core.page.TableDataInfo;
import com.qst.system.domain.vo.LoansVo;
import com.qst.system.service.ILoansService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 贷款统计图表Controller
 * 
 * @author 86182
 * @date 2025-08-23
 */
@RestController
@RequestMapping("/system/loanschart")
public class LoansChartController extends BaseController {

    @Autowired
    private ILoansService loansService;

    /**
     * 查询贷款列表用于图表统计
     */
    @PreAuthorize("@ss.hasPermi('system:loanschart:list')")
    @GetMapping("/list")
    public TableDataInfo list(LoansVo loansVo) {
        startPage();
        List<LoansVo> list = loansService.selectLoansList(loansVo);
        return getDataTable(list);
    }
}